package com.wicket.okrbff.web.contorller;

import com.wicket.okrbff.biz.service.TypeCodeService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrframework.integration.FwBaseTypeCodeClient;
import com.wicket.okrframework.integration.dto.QueryCodeListRespDto;
import com.wicket.okrframework.integration.dto.QueryCodeListReqDto;
import cn.hutool.core.bean.BeanUtil;
import java.util.stream.Collectors;
import com.wicket.okrbff.common.exception.Assert;
import java.util.ArrayList;
import java.util.List;
import com.wicket.okrframework.integration.dto.QueryCodeListComRespDto;
import com.wicket.okrframework.integration.dto.QueryCodeListComReqDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "TypeCode", tags = {"TypeCode"})
@RestController
// @RequestMapping("/oms/typeCode/")
public class TypeCodeController {

    @Autowired
    TypeCodeService typeCodeService;



    /**
   * B查询编码列表（公共）
   * gen by moon at 9/27/2022, 9:36:45 AM
   */
    @PostMapping("/oms/typeCode/queryCodeListCom")
    @ApiOperation(value = "B查询编码列表（公共）", response = OkrResult.class)
    public OkrResult<BffQueryCodeListComRespDto> queryCodeListCom(@RequestBody(required=false) @Validated BffQueryCodeListComReqDto reqDTO){
        return OkrResult.success(typeCodeService.queryCodeListCom(reqDTO));
    }







}
